<template>
  <div style="width: 100%;height: 100%;">
    <table border="0">
      <tr>
        <td style="width: 7rem;">密码类型</td>
        <td>
          <select style="border: 1px solid;" >
            <option value="交易密码">交易密码</option>
          </select>
        </td>
      </tr>
      <!-- <tr>
        <td style="width: 7rem;">手机号：</td>
        <td><input type="password" v-model="parampass.mobile" style="border: 1px solid;" /></td>
      </tr> -->
      <tr>
        <td style="width: 7rem;">新密码：</td>
        <td><input type="password" v-model="parampass.password" style="border: 1px solid;" /></td>
      </tr>
      <tr>
        <td style="width: 7rem;">再次输入新密码</td>
        <td><input type="password" v-model="parampass.password_repetition" style="border: 1px solid;" /></td>
      </tr>
    </table>

    <button style="padding:2px 15px;text-align: center;margin-top: 20px;border: 1px solid;" @click="sub()">修改</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      bottomheight: 'calc(40% - 5px)',
      parampass: {
        // mobile: '',
        password: '', //密码
        password_repetition: '', //重复密码
        group: 'app',
        code: '1234'
      }
    };
  },
  mounted() {},
  methods: {
    //修改密码
    sub() {
      this.$post('v1/site/up-pwd', this.parampass).then(res => {
        if (res.code == 200) {
          this.$notify.success(res.message || '修改成功！');
          (this.parampass.mobile = ''), (this.parampass.password = ''), (this.parampass.password_repetition = '');
        } else {
          this.$notify.error(res.message || '修改失败！');
        }
      });
    }
  }
};
</script>
